package tk.mybatis.springboot.model;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * Created by admin on 2017/5/15.
 */
@Data
public class BaseUser {
    @Id
    private Integer id;
    private String username;
    private String password;
    private String name;
    @Transient
    private String type;

    public boolean isAdmin(){
        return "admin".equals(type);
    }
    public boolean isStudent(){
        return "student".equals(type);
    }
    public boolean isTeacher(){
        return "teacher".equals(type);
    }
}
